<ul class="nav nav-tabs">
	<li ng-class="{'active':pagedata.op=='list'}"><a href="javascript:;" ng-click="access()">底部菜单列表</a></li>
</ul>
<div class="keyword-list-head" ng-if="pagedata.op=='list'">
	<div class="keyword-list-head clearfix">
		<div class="pull-right">
			<a href="javascript:;" ng-click="access('edit')" class="btn btn-primary">+添加菜单</a>
		</div>
		<div class="input-group jinyun-margin-bottom" style="width:465px;">
			<input class="form-control" type="text" ng-model="pagedata.params.key" value="" placeholder="输入关键字名称" style="width: 427px;">
			<span class="input-group-btn"><button id="submit" ng-click="pagedata.params.page=1;access(pagedata.op,made_query(pagedata.params))" class="btn btn-default"><i class="fa fa-search"></i> 搜索</button></span>
		</div>
	</div>
</div>
<div class="clearfix table-responsive" ng-if="pagedata.op=='list'">
<form method="post" class="form-horizontal jinyun-form" id="form1">
	<table class="table jinyun-table table-hover vertical-middle jinyun-form">
		<thead class="navbar-inner">
			<tr>
				<th>删除</th>
				<th>菜单名称</th>
				<th>生效范围</th>
				<th>菜单状态</th>
				<th>创建时间</th>
				<th class="text-right">编辑</th>
			</tr>
		</thead>
			<tr ng-repeat="item in pagedata.list">
				<td>
				<input id="id-{{item.id}}" type="checkbox"  name="ids[]" value="{{item.id}}">
				<label class="text-over reply-item-name" for="id-{{item.id}}">&nbsp;</label>
				</td>
				<td>{{item.title}}</td>
				<td>{{item.plugin}}</td>
				<td class="vertical-middle">
					<label>
					<div ng-if="item.status>0" class="switch  switchOn" ng-click="post({'status':0,'id':item.id},'set')"></div>
					<div ng-if="item.status<1" class="switch" ng-click="post({'status':1,'id':item.id},'set')"></div>
					</label>
				</td>
				<td>{{item.createtime}}</td>
				<td class="text-right"><a href="javascript:;" ng-click="access('edit','id='+item.id)" class="btn btn-default">编辑</a>
					<a href="javascript:;" ng-click="delone(item.id)" title="删除" class="btn btn-default btn-sm"><i class="fa fa-times"></i></a>
				</td>
			</tr>
	</table>
	<div>
	<input id="select_all" type="checkbox" name=""  class="jinyun-margin-left" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});">
	<label for="select_all">&nbsp;</label>
	<button class="btn btn-danger" ng-click="del()">删除</button>
	</div>
</form>
	<!-- 分页导航 -->
	<div ng-include="sys_html('common/page',true)"></div>
</div>
<div id="editform" ng-if="pagedata.op=='edit'" class="form-horizontal form panel-body">
	<div class="panel panel-info">
		<div class="panel-heading">基础信息</div>
		<div class="panel-body">
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 left-label">生效范围</label>
						<div class="col-sm-9 col-xs-12">
							<select class="form-control" ng-model="pagedata.item.plugin">
								<option ng-repeat="p in pagedata.plugins" ng-selected="pagedata.item.plugin==p.name" value="{{p.name}}" >{{p.title}}</option>
							</select>
							<div class="help-block">设置该菜单生效范围，如果选择所有插件，则对所有插件生效。注意，如果插件自己设置了单独的底部菜单，则插件自己的底部菜单生效</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 left-label">菜单名称</label>
						<div class="col-sm-9 col-xs-12">
							<input type="text" name="keyword" class="form-control " ng-model="pagedata.item.title"/>
							<div class="help-block"></div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 left-label">是否启用</label>
						<div class="col-xs-12 col-sm-8 col-lg-9">
							<div class="radio radio-inline" ng-repeat="(v,t) in pagedata.statuss">
									<input id="status-{{v}}" type="radio" name="status" value="{{v}}" ng-model="pagedata.item.status"/>
									<label for="status-{{v}}">
													{{t}}
									</label>
							</div>
							<div class="help-block"></div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 left-label">图标颜色</label>
						<div class="col-sm-9 col-xs-12">
							<input type="color" class="form-control " style="width:20%" ng-model="pagedata.item.data.iconcolor"/>
							<div class="help-block">设置菜单图标颜色</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 left-label">文字颜色</label>
						<div class="col-sm-9 col-xs-12">
							<input type="color" class="form-control " style="width:20%" ng-model="pagedata.item.data.textcolor"/>
							<div class="help-block">设置菜单文字颜色</div>
						</div>
					</div>
					<div class="panel panel-info">
						<div class="panel-heading">
							管理菜单，菜单数量建议在5个以内。菜单从左网友排列，排序值越大越靠右。具体请查看手机端效果
						</div>
						<div class="panel-body table-responsive">
							<div class="alert-new">
								<table class="jinyun-table table-hover vertical-middle jinyun-form">
									<thead>
									<tr>
										<th width="120">排序</th>
										<th>图标</th>
										<th>文字</th>
										<th>链接</th>
										<th class="text-right">操作</th>
									</tr>
									</thead>
									<tbody id="re-items">
									<tr ng-repeat="menu in pagedata.item.data.menus">
										<td><input  type="text" class="form-control" ng-model="menu.paixu"/></td>
										<td><a href="javascript:;" ng-click="modal_func(menu,'icon','tools.icon')"><i class="fa {{menu.icon || 'fa-anchor'}}"></i></a></td>
										<td><input  type="text" class="form-control" ng-model="menu.title"/></td>
										<td><input  type="text" class="form-control" ng-model="menu.url"/></td>
										<td  class="text-right">
											<a href="javascript:;" ng-click="modal_func(menu,'url','tools.link')" title="选择链接" class="btn btn-default btn-sm">系统链接</a>
											<a href="javascript:;" ng-click="pagedata.item.data.menus.splice($index,1)" title="删除此条目" class="btn btn-default btn-sm"><i class="fa fa-times"></i></a>
										</td>
									</tr>
									</tbody>
								</table>
							</div>
							<div class="alert alert-block alert-new">
								<a href="javascript:;" ng-click="pagedata.item.data.menus.push({'title':'按钮文字'})">添加数据 <i class="fa fa-plus" title="添加菜单"></i></a>
							</div>
						</div>
					</div>
		</div>
	</div>
	<div class="jinyun_bar border tc with_form">
		<button class="btn btn-primary" ng-click="post(pagedata.item,'post')">提交</button>
	</div>
</div>



